﻿#ifndef DAEMONLOG_H
#define DAEMONLOG_H

#include "qbaseentity.h"

#define PROGRESS_START_ERROR        0      //唤醒失败
#define PROGRESS_START_INIT         1       //首启守护唤醒
#define PROGRESS_START_VANISH       2       //常在守护唤醒
#define PROGRESS_START_CPUUSE       3       //CPU守护唤醒
#define PROGRESS_START_HEARTBEAT    4       //心跳守护唤醒
#define PROGRESS_START_USER         5       //用户手动唤醒

class DaemonLog : public QBaseEntity
{
    Q_OBJECT
    // 使用 Q_PROPERTY 宏定义属性
    Q_PROPERTY(uint64_t id READ getId WRITE setId)
    Q_PROPERTY(QString start_time READ getStart_time WRITE setStart_time)
    Q_PROPERTY(int start_type READ getStart_type WRITE setStart_type)
    Q_PROPERTY(QString progress_name READ getProgress_name WRITE setProgress_name)
    Q_PROPERTY(QString progress_path READ getProgress_path WRITE setProgress_path)
    Q_PROPERTY(QString remark READ getRemark WRITE setRemark)

public:
    explicit DaemonLog(QObject *parent = nullptr);
    DaemonLog(uint64_t id,QString start_time,int start_type,QString progress_name,QString progress_path,QString remark,QObject *parent = nullptr);
    ~DaemonLog();
    uint64_t getId() const;
    void setId(const uint64_t &value);

    QString getStart_time() const;
    void setStart_time(const QString &value);

    int getStart_type() const;
    void setStart_type(int value);

    QString getProgress_name() const;
    void setProgress_name(const QString &value);

    QString getProgress_path() const;
    void setProgress_path(const QString &value);

    QString getRemark() const;
    void setRemark(const QString &value);

private:
    uint64_t id;
    QString start_time;/**< 启动时间 */
    int start_type;/**< 启动类型 */
    QString progress_name;/**< 进程名字 */
    QString progress_path;/**< 进程路径 */
    QString remark;/**< 备注信息 */
};

#endif // DAEMONLOG_H
